
<div class="noidung" id="here">
    <div style="padding-left: 0px; width: 100%">
        <div class="colleft">
            <div class="bgtopic">
                <div class="topic_title"> Quảng cáo</div>
            </div>
            <div class="quangcao a img">
                <a href="#">
                    <img src="<?php echo Yii::app()->request->baseUrl; ?>/upload/quangcao/banner-1.jpg" width="220">
                </a>
                <a href="#">
                    <img src="<?php echo Yii::app()->request->baseUrl; ?>/upload/quangcao/banner-2.jpg" width="220">
                </a>
                <a href="#">
                    <img src="<?php echo Yii::app()->request->baseUrl; ?>/upload/quangcao/banner-3.jpg" width="220">
                </a>
                <a href="#">
                    <img src="<?php echo Yii::app()->request->baseUrl; ?>/upload/quangcao/banner-4.jpg" width="220">
                </a>
            </div>
        </div>
        <div class="colright" style="margin: 0px">
            <div style="margin-left: 7px; width: 100%">
                <?php
                $css = "";
                $dem = null;
                if ($produc != null) {
                    $dem = $produc->pr_name;

                    if (strlen($dem) >= 60) {
                        $css = "bgtopic600";
                    } else if (strlen($dem) >= 39) {
                        $css = "bgtopic500";
                    } else {
                        $css = "bgtopic340";
                    }
                }
                ?>


                <div class="<?php echo $css; ?>">
                    <div class="topic_title">
                        <?php
                        if ($produc != null) {
                            echo $produc->pr_name;
                        }
                        ?>
                    </div>
                </div>
               
                <p>
                    <div style="width: 680px; padding-right: 10px; padding-bottom: 10px; ">
                    <?php
                    if ($produc != null) {
                        echo $produc->pr_content;
                    } else {
                        echo '<div style="color:red;font-weight: bold;font-size: 15pt;">Nội dung không tồn tại!</div>';
                    }
                    ?>
                    </div>
                </p>
                <div style="width: 100%;height: 50px"></div>
                 <div class="<?php echo $css; ?>">
                    <div class="topic_title">
                        <?php
                        if ($category != null) {
                            echo $category->catename .' khác';
                        }
                        ?>
                    </div>
                </div>
                <p>
                    <?php
                if (!empty($items)) {
                    foreach ($items as $item) {
                        ?>
                        <div class="boxsp">
                            <div class="sale">
                                <div class="txtdiscount">
                                    <?php echo $item->discount; ?>
                                    <span>%</span>
                                </div>
                            </div>
                            <div class="boxspImg">
                                <?php
                                $getUrl = $item->pr_url;
                                if ($getUrl === "") {
                                    $getUrl = $this->createUrl('/site/thong_tin', array('id' => $item->prid));
                                }
                                ?>
                                <a href="<?php echo $getUrl; ?>" title="<?php echo $item->pr_name; ?>">
                                    <img src="<?php echo Yii::app()->request->baseUrl . '/upload/product/avata/' . $item->avatar ?>" width="205" height="205">
                                </a>
                            </div>
                            <div class="boxspTitle">
                                <a href="<?php echo $getUrl; ?>" title="<?php echo $item->pr_name; ?>">
                                    <?php echo $item->pr_name; ?>
                                </a>
                            </div>
                            <div class="boxspPrice">
                                <div class="txttimer">
                                    <div class="product-date-<?php echo $item->prid; ?>"></div>

                                    <script>
                                        jQuery(document).ready(function() {

                                            jQuery(".product-date-<?php echo $item->prid; ?>").countdown({
        <?php
        if (($item->pr_enddate) == '') {
            $date = "1/1/2013 0:0:0";
        } else {
            $date = $item->pr_enddate;
        }
        ?>

                                                date: "<?php echo $date; ?>",
                                                render: function(data) {
                                                    jQuery(this.el).html("Còn " + this.leadingZeros(data.days, 2) + " <span> ngày </span>");
                                                }
                                            });

                                        });

                                    </script>
                                </div>
                                <div class="btnXem">
                                    <a href="<?php echo $getUrl; ?>" title="<?php echo $item->pr_name; ?>"><img src="<?php echo Yii::app()->request->baseUrl; ?>/icon/btnxem.png"></a>
                                </div>
                            </div>
                        </div>
                        <?php
                    }
                }
                ?>

                </p>
            </div>
        </div>
    </div>

    <div style="clear: both"></div>
</div>

